<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="../taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>列出工作岗位</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../css/four.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../css/jqe/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="../css/jqe/themes/icon.css"/>

    <script type="text/javascript" src="../js/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
	
    <script type="text/javascript">
   
        $(function(){
          
         	//初始化对话框
        	 $('#dwSP').window({
       		   onBeforeClose:function(){ 
       			   //取消时关闭等待框
       			   setTimeout(function(){ 
       				   sending.style.visibility = "hidden";
					   }, 250);
       	    }});
       	
            $(".btnAll").each(function(i,v){
         	   //变手型
         	     $(v).mouseover(function() {
     				$(this).css("cursor", "hand");
     			 }).mouseout(function() {
     				$(this).css("cursor", "pointer");
     			 });
         	   
          	    if($(v).html()=='【审批】'){
        		   $(v).click(function(){
        			   $('#dw_p').html($(v).prop("title")+":");
        			   $("#sqjid").val($(v).prop("lang"));
        			   $('#dwSP').window("open");
        			 
        		   });
        	   }else if($(v).html()=='【删除】'){
        		   $(v).click(function(){
         			  if(confirm("确认删除'"+$(v).prop("title")+"'?")){
         				  location.href="delQJia.do?sqjid="+$(v).prop("lang"); 
         			  }
         		   });
         	   }
         	   
            });
        	
        });
    </script>
</head>
<body>
	<!-- 包含等待框 -->
	<jsp:include page="../waittable.jsp" flush="true" />
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr valign="top">
			<td bgcolor="#FFFFFF"><table width="96%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#aec3de">
					<tr align="left" bgcolor="#F2FDFF">
						<td colspan="7" class="optiontitle">个人请假详情</td>
					</tr>
				  	<tr align="center">
				  	    <td align="center" bgcolor="#ebf0f7">申请人</td>
					    <td align="center" bgcolor="#ebf0f7">开始时间</td>
						<td align="center" bgcolor="#ebf0f7">结束时间</td>
						<td align="center" bgcolor="#ebf0f7">请假类型</td>
						<td align="center" bgcolor="#ebf0f7">请假缘由</td>
						<td align="center" bgcolor="#ebf0f7">申请状态</td>
						<td align="center" bgcolor="#ebf0f7">操作</td>
					</tr>
					<c:forEach items="${page.results}" var="qjia">
						<tr align="center" bgcolor="#FFFFFF">
						    <td align="center" bgcolor="#ebf0f7">${qjia.ename}</td>
						    <td align="center"><fmt:formatDate value="${qjia.sqjbegin}" pattern="yyyy-MM-dd HH" /></td>
							<td align="center"><fmt:formatDate value="${qjia.sqjend}" pattern="yyyy-MM-dd HH" /></td>
							<td align="center">${qjia.sqjcnfm}</td>
							<td align="center" title="${qjia.sqjdesc}">${qjia.sqjreson}</td>
							<td align="center"  title="${qjia.sqjqueren}">${qjia.sqjstate==1?"待批":(qjia.sqjstate==2?"已批准":"未批准")}</td>
							<td align="center">
							<c:if test="${qjia.sqjstate==1}">	
								<span class="btnAll" lang="${qjia.sqjid}" title="${qjia.sqjreson}">【审批】</span>
						    </c:if> 
								<span class="btnAll" lang="${qjia.sqjid}" title="${qjia.sqjreson}">【删除】</span>
							</td>
						</tr>
					</c:forEach>
					<tr align="right" bgcolor="#ebf0f7">
							<td colspan="7">
							<jk:page totalPage="${page.totalPage}" pageNo="${page.pageNo}" totalRecord="${page.totalRecord}" url="lsD.do" />
							</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
		  <td align="center" colspan="7" style="color: red">${msg}</td>
		</tr>
	</table>
   
	 <div id="dwSP" class="easyui-window" title="审批请假信息" data-options="modal:true,minimizable:false,closed:true,maximizable:false,iconCls:'icon-save'" style="width:300px;height:190px;padding:10px;display: none;">
		<form action="spQJia.do" method="post">
		   <p id="dw_p"></p>
		<input name="sqjid" id="sqjid" type="hidden"   />
		     请选择：<select name="sqjstate">
		               <option value="2">同意</option>
		               <option value="3">不同意</option>
		        </select>
               <br>
		     简短批复：<textarea name="spnote" rows="2" cols="30" id="sp_dnote"></textarea><br><br>
		      <input type="submit" value="提交" /><br>
		</form>
	</div>
	
</body>
</html>